package com.hwadee.teachingprocessmanagementsystem.dto.student;

import com.hwadee.teachingprocessmanagementsystem.entity.CourseChangeRequest;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 学生调课申请Dto
 * @Author: Jukomu
 * @Package: com.hwadee.teachingprocessmanagementsystem.dto.student
 * @Project: TeachingProcessManagementSystem
 * @name: StudentCourseChangeDto
 * @Date: 2024/7/15-22:45
 * @Filename: StudentCourseChangeDto
 */
@Data
public class StudentCourseChangeDto implements Serializable {
    private List<CourseTeacherInfo> courseTeacherList;
    private List<CourseChangeRequest> courseChangeRequestList;

    public void addCourseTeacherInfo(CourseTeacherInfo courseTeacherInfo) {
        if (this.courseTeacherList == null) {
            this.courseTeacherList = new ArrayList<>();
        }
        this.courseTeacherList.add(courseTeacherInfo);
    }

    public void addCourseTeacherInfo(String courseId, String courseName, String teacherId, String teacherName){
        CourseTeacherInfo courseTeacherInfo = new CourseTeacherInfo(courseId, courseName, teacherId, teacherName);
        this.addCourseTeacherInfo(courseTeacherInfo);
    }
}



@Data
class CourseTeacherInfo implements Serializable {
    // 课程编号
    private String courseId;
    // 课程名
    private String courseName;
    // 教师编号
    private String teacherId;
    // 教师名
    private String teacherName;

    public CourseTeacherInfo() {
    }

    public CourseTeacherInfo(String courseId, String courseName, String teacherId, String teacherName) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.teacherId = teacherId;
        this.teacherName = teacherName;
    }
}
